package com.example.eurekaclientdemo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class HelloWorldService {
    @Value("${hello.msg}")
    private String hi;
    @GetMapping("/hi")
    public String hello(){
        return hi;
    }
    @PostMapping("/add")
    public Integer add(Integer i,Integer n){
        return i+n;
    }
}
